using UnityEngine;
using System.Collections;

//---------------------------------------------------------------------------------------------------------
// Script for a trigger to change the relative time of all subsceptible objects
//---------------------------------------------------------------------------------------------------------

public class TriggRelativeTime : MonoBehaviour
{
	public float	m_fRelativeTime		= 0.1f;
	
	
	void OnTriggerEnter (Collider _cOther) 
    {
		_cOther.gameObject.SendMessage("ChangeTimeData", m_fRelativeTime);
    }
	void OnTriggerExit (Collider _cOther) 
    {
		_cOther.gameObject.SendMessage("ChangeTimeData", 1.0f/m_fRelativeTime);
    }
}
